﻿using BCEntity.Common.UploadFileRecord;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Common.UploadFileRecord
{
    /// <summary>
    /// 上传图片记录数据处理接口
    /// </summary>
    public interface IUploadFileRecordData
    {
        /// <summary>
        /// 添加上传文件记录
        /// </summary>
        /// <param name="uploadFileRecordEntity">上传文件记录信息</param>
        /// <returns></returns>
        Task<UploadFileRecordEntity> Add(UploadFileRecordEntity uploadFileRecordEntity);
        /// <summary>
        /// 获取未转移至OSS的记录列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<UploadFileRecordEntity>> GetNoneTransportListAsync();
        /// <summary>
        /// 修改文件记录为已转移只OSS
        /// </summary>
        /// <param name="uploadFileRecordNo">上传文件记录编号</param>
        /// <returns></returns>
        Task<bool> UpdateTransportedAsync(string uploadFileRecordNo);

        /// <summary>
        /// 获取上传文件记录
        /// </summary>
        /// <param name="uploadFileRecordNo">上传文件记录编号</param>
        /// <returns></returns>
        Task<UploadFileRecordEntity> GetEntity(string uploadFileRecordNo);
        /// <summary>
        /// 删除上传文件记录
        /// </summary>
        /// <param name="uploadFileRecordNo">上传文件记录编号</param>
        /// <returns></returns>
        Task<bool> Delete(string uploadFileRecordNo);
        /// <summary>
        /// 获取上传文件记录
        /// </summary>
        /// <param name="fileType">文件类型</param>
        /// <param name="index">页码</param>
        /// <param name="size">数量</param>
        /// <returns></returns>
        Task<(IEnumerable<UploadFileRecordEntity>, int)> GetUploadFileRecords(string fileType, int index, int size);
    }
}
